import React from 'react';
class Input2 extends React.Component {

  render() {
    let { onPressEnter, ...props } = this.props;
    return <div className=''>
      <input type="text" {...props} onKeyDown={e => {
        if (e.keyCode == 13) {
          onPressEnter(e)
        }
      }} />
    </div>;
  }
}
function Input(props) {
  let { onPressEnter, ...attr } = props;
  return <div className=''>
    <input type="text" {...attr} onKeyDown={e => {
      if (e.keyCode == 13) {
        onPressEnter(e)
      }
    }} />
  </div>;
}
export default Input